package com.dashu.api.controller;


import com.dashu.api.controller.command.FeignCommand;
import com.dashu.infrastructure.SmsProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/index")
public class indexController {
    @Autowired
    private SmsProperties smsProperties;
    @PostMapping("/hello")
    public String hello(@RequestBody FeignCommand command){
        return command.getName()+command.getAge()+command.getPhone()+" hello word";
    }

    @GetMapping ("/nacos")
    public String nacosProperties(){
        return smsProperties.getType()+smsProperties.getCode();
    }
}
